<%--
  Created by IntelliJ IDEA.
  User: ljl
  Date: 2024/12/26
  Time: 上午9:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>axiosTest</title>
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div class="axiosTest" id="axiosTest">
    <el-row>
        <el-button type="primary" @click="submit()">主要按钮</el-button>
    </el-row>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
<script>
    new Vue({
        el: '#axiosTest',
        data: {
            return:{

            }
        },
        methods: {
            submit(){
                alert("aaa")
                axios.get("testt")
                    .then(res => {
                        console.log(res.data)
                    })
                    .catch(err => {
                        console.log(err)
                    })
            }
        },
        created() {

        }
    })
</script>
</html>
